var Log = Class.create({
  initialize: function () {
    this.entry = new Array();
  },
  get : function () {
    var log = "";
    for(var i=0; i<this.entry.size(); i++)
      log = (this.entry[i] + "<br />") + log;
    return log;
  },
  // normal add
  add: function (line) {
    this.put(line);
  },
  // orange add
  addWarning: function (line) {
    this.put("<span style='color:orange;'>[Warning] " + line + "</span>");
  },
  // red add
  addError: function (line) {
    this.put("<span style='color:red;'>[Error] " + line + "</span>");
  },
  // red and bold add
  addFatalError: function (line) {
    this.put("<span style='color:red; font-weight:bold;'>[Fatal error] "
	+ line + "</span>");
  },
  put: function (line) {
    this.entry[this.entry.size()] = line;
  },
  clear: function () {
    this.entry.clear();
  }
});



